/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

#app {
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  font-size: 1.3rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body {
  padding: 25px;
}

.form-section {
  margin-bottom: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.result-section {
  margin-top: 30px;
}

.result-card {
  margin-bottom: 15px;
}

.result-title {
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.result-content {
  color: #666;
  line-height: 1.6;
}

.result-content p {
  margin-bottom: 10px;
}

.result-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.test-data-list {
  max-height: 400px;
  overflow-y: auto;
}

.test-data-item {
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.test-data-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.test-data-item.selected {
  border-color: #667eea;
  background: #f0f4ff;
}

.test-data-question {
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.test-data-sql {
  color: #666;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  background: #f8f9fa;
  padding: 8px;
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-all;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.stat-card {
  text-align: center;
  padding: 20px;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 5px;
}

.stat-label {
  color: #666;
  font-size: 0.9rem;
}

.message-alert {
  margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Element Plus 组件样式覆盖 */
.el-card {
  border-radius: 10px;
}

.el-button {
  border-radius: 8px;
}

.el-input__inner,
.el-textarea__inner {
  border-radius: 8px;
}

.el-tag {
  border-radius: 20px;
}

.el-collapse {
  border: none;
}

.el-collapse-item__header {
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 5px;
  padding: 15px;
  font-weight: bold;
}

.el-collapse-item__content {
  padding: 15px;
  background: white;
  border-radius: 8px;
  margin-bottom: 10px;
}
